home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Graphics & Sound Program…ng Techniques for the Mac
/
Graphics and Sound Programming Techniques for the Mac.iso
/
Goodies
/
Graphics
/
Pict2ppat™ ƒ
/
Example ppat Source Code
/
Symantec Example
/
ppat User
/
ppatUser.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-08-14
|
1KB
|
52 lines
//____________________________________________________________
// ppatUser.c
//
// Copyright © Dan Parks Sydow, 1995
// From the CD that accompanies the book:
// "Graphics and Sound Programming Techniques for the Mac",
// M&T Books, 1995
//____________________________________________________________
#define rRobotPixelPattern 128
#define rDisplayWindow 128
//____________________________________________________________
void main( void )
{
WindowPtr theWindow;
PixPatHandle theRobotPixPat;
Rect theRect;
InitGraf( &qd.thePort );
InitFonts();
InitWindows();
InitMenus();
TEInit();
InitDialogs( 0L );
FlushEvents( everyEvent, 0L );
InitCursor();
theWindow = GetNewCWindow( 128, nil, (WindowPtr)-1L );
SetPort( theWindow );
theRobotPixPat = GetPixPat( rRobotPixelPattern );
PenPixPat( theRobotPixPat );
PenSize( 20, 20 );
MoveTo( 30, 270 );
Line( 400, 70 );
SetRect( &theRect, 10, 10, 450, 260 );
PaintRect( &theRect );
while ( !Button() )
;
}